#coding: utf-8

require 'dm-core'
require 'dm-validations'
require 'dm-timestamps'
require 'dm-migrations'
require 'sinatra'

DataMapper.setup(:default, "sqlite3://#{Dir.pwd}/patrimoine.sqlite3")

require './model/Thematic.rb'
require './model/User.rb'
require './model/Node.rb'
require './model/Link.rb'
require './model/Content.rb'

DataMapper.finalize
Thematic.auto_upgrade!
User.auto_upgrade!
Node.auto_upgrade!
Link.auto_upgrade!
Content.auto_upgrade!

require './web/Thematic.rb'
require './web/User.rb'
require './web/Node.rb'
require './web/Login.rb'
require './web/Content.rb'
require './web/Link.rb'
